function GuiDialogDetails() {
  
};

GuiDialogDetails.instance = function(prefix, purchase) {
  var gui = { sample: document.getElementById(prefix + '_sample_div'),
              quantityPic: document.getElementById(prefix + '_quantityPic_div'),
              quantity: document.getElementById(prefix + '_quantity_div'),
              pricePic: document.getElementById(prefix + '_pricePic_div'),
              price: document.getElementById(prefix + '_price_div'),
              selects: [],
              design: document.getElementById(prefix + '_design_div')
            };
  if (purchase.selects) {
    for (var i = 0, il = purchase.selects.length; i < il; i++) {
      gui.selects[gui.selects.length] = GuiDialogDetails._select(prefix + '_' + i);
    }
  } else { 
    for (var j = 0, jl = purchase.pi_selects.length; j < jl; j++) {
      gui.selects[gui.selects.length] = GuiDialogDetails._select(prefix + '_' + j);
    }
  }
  return gui;
};

GuiDialogDetails._select = function(prefix) {
  return { name: document.getElementById(prefix + '_name_div'),
           option: document.getElementById(prefix + '_option_div')
         };
};
